Skip to content

refactor!: Rename ImpersonateUserOptions to CreateUserImpersonationRequest and pass by value - #4462

Merged
gmlewis merged 2 commits into
google:masterfrom
jvm986:create-user-impersonation-request
Aug 20, 2026
Merged

refactor!: Rename ImpersonateUserOptions to CreateUserImpersonationRequest and pass by value#4462
gmlewis merged 2 commits into
google:masterfrom
jvm986:create-user-impersonation-request

Conversation

@jvm986

@jvm986 jvm986 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Continues the request-body-by-value work in #3644, this time for AdminService.CreateUserImpersonation.
The type had an Options suffix despite being a POST body, and was passed by pointer even though its only parameter, scopes, is required. It's renamed after the operation, passed by value, and Scopes drops omitempty. Removed from both paramcheck allowlists (body-allowed-pointer-types and body-allowed-wrong-names).

BREAKING CHANGE: AdminService.CreateUserImpersonation now takes a new CreateUserImpersonationRequest (with non-pointer Scopes) by value instead of *ImpersonateUserOptions.

cc @JamBalaya56562 @ManavSharma142 @stevehipwell

`CreateUserImpersonationRequest` and pass by value

BREAKING CHANGE: `AdminService.CreateUserImpersonation` now takes
`CreateUserImpersonationRequest` by value instead of
`*ImpersonateUserOptions`. `Scopes` is required and no longer uses
`omitempty`.
@jvm986
jvm986 marked this pull request as ready for review August 20, 2026 15:57

@stevehipwell stevehipwell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.51%. Comparing base (92c4fb9) to head (a35a561).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4462   +/-   ##
=======================================
  Coverage   98.51%   98.51%           
=======================================
  Files         194      194           
  Lines       17603    17603           
=======================================
  Hits        17342    17342           
  Misses        261      261           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gmlewis gmlewis added the Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). label Aug 20, 2026

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @jvm986 and @stevehipwell!
LGTM.
Merging.

@gmlewis
gmlewis merged commit 8568184 into google:master Aug 20, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants